<div class="layuimini-container layui-anim layui-anim-upbit">
    <div class="layuimini-main">
    
        <table class="layui-hide" id="myleaveTable" lay-filter="currentTableFilter"></table>

        <script type="text/html" id="currentTableBar">
            <a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="more">查看详情</a>
        </script>

    </div>
</div>

<script>
	layui.use(['form', 'table','layuimini','element'], function () {
        var $ = layui.jquery,
            form = layui.form,
            table = layui.table,
            layuimini = layui.layuimini;
            
        table.render({
            elem: '#myleaveTable',
            url: 'involvedprocess',
            toolbar: '#toolbarDemo',
            defaultToolbar: ['filter', 'exports', 'print', {
                title: '提示',
                layEvent: 'LAYTABLE_TIPS',
                icon: 'layui-icon-tips'
            }],
            cols: [
		            [
		                {field: 'executionid', width: 200, title: '执行ID'},
		                {field: 'processInstanceid', width: 120, title: '流程实例ID'},
		                {field: 'activityid', width: 150, title: '当前节点'},
		                {field: 'businesskey', width: 200, title: '业务号'},
		                {title: '操作', minWidth: 50, templet: '#currentTableBar', fixed: "right", align: "center"}
		            ]
            ],
            limits: [10, 15, 20, 25, 50, 100],
            limit: 10,
            page: true
        });
        
        // 监听删除操作
	    table.on('tool(currentTableFilter)', function (obj) {
            var data = obj.data;
            if (obj.event === 'more') {
            	var processInstanceId = data.processInstanceid;
                window.open("traceprocess/"+processInstanceId,"_blank");  
            }
        });
    });
    
</script>